<%@ page contentType="text/html;charset=UTF-8" %>
<html>
	<head>
		<title>ajax上传文件</title>
		
		<link rel="stylesheet" href="/css/jquery.plupload.queue.css" >
		<script src="http://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
		
		<script src="/js/plupload/plupload.full.min.js"></script>
		<script src="/js/plupload/jquery.plupload.queue.js"></script>
		<script src="/js/plupload/zh_CN.js"></script>
	</head>
<body>
	<div style="width:750px; margin:0 auto">   
	    <form id="formId" action="Submit.action" method="post">   
	        <div id="uploader">   
	            <p>您的浏览器未安装 Flash, Silverlight, Gears, BrowserPlus 或者支持 HTML5 .</p>   
	        </div>   
	        <input value="重新上传" id="Reload" type="button">   
	    </form>   
	</div>
	<script type="text/javascript">
	$(function(){   
	    function plupload(){   
	        $("#uploader").pluploadQueue({   
	            // General settings   
	            runtimes : 'html5,gears,browserplus,silverlight,flash,html4',   
	            url : 'upload',   
	            max_file_size : '10mb',   
	            unique_names: true,   
	            chunk_size: '2mb',   
	            // Specify what files to browse for   
	            filters : [   
	                {title: "Image files", extensions: "jpg,gif,png"},   
	                {title: "Zip files", extensions: "zip"}   
	            ],   
	            resize: {width: 640, height: 480, quality: 90},   
	            // Flash settings   
	            flash_swf_url: 'plupload/plupload.flash.swf',   
	            // Silverlight settings   
	            silverlight_xap_url: 'plupload/plupload.silverlight.xap',   
	            // 参数   
	            multipart_params: {'user': 'Rocky', 'time': '2012-06-12'}   
	        });   
	    }   
	    plupload();   
	    $('#Reload').click(function(){   
	        plupload();   
	    });   
	});
	</script>
</body>
</html>
